﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.ComponentModel;
using DoAnWeb.DTO;
using DoAnWeb.DAO;

namespace DoAnWeb.BUS
{
    public class TaiKhoanBUS
    {
        private TaiKhoanDAO DAO = new TaiKhoanDAO();

        public BindingList<TaiKhoanDTO> GetList()
        {
            return DAO.GetList();
        }

        public TaiKhoanDTO GetFromId(string _TenTaiKhoan)
        {
            return DAO.GetFromId(_TenTaiKhoan);
        }

        public TaiKhoanDTO GetPassword(string _TenTaiKhoan)
        {
            return DAO.GetPassword(_TenTaiKhoan);
        }

        public string GetKind(string _TenTaiKhoan)
        {
            return DAO.GetKind(_TenTaiKhoan);
        }

        public bool CheckExist(string _TenTaiKhoan, string _MatKhau)
        {
            return DAO.CheckExist(_TenTaiKhoan, _MatKhau);
        }

        public bool Update_PassWord(string _TenTaiKhoan, string _NewMatKhau)
        {
            return DAO.Update_PassWord(_TenTaiKhoan, _NewMatKhau);
        }

        public bool CheckDelete(int _Ma)
        {
            return DAO.CheckDelete(_Ma);
        }

        public bool UnCheckDelete(int _Ma)
        {
            return DAO.UnCheckDelete(_Ma);
        }

        public bool Delete(int _Ma)
        {
            return DAO.Delete(_Ma);
        }

        public bool Add(TaiKhoanDTO _DTO)
        {
            return DAO.Add(_DTO);
        }

        public bool Update(TaiKhoanDTO _DTO)
        {
            return DAO.Update(_DTO);
        }

    }
}